<script type="text/javascript">
    var wxUserInfo = {};
    if (isWechat()) {
        wxUserInfo.nickname = '<%=userInfo.nickname%>';
        wxUserInfo.sex = ("<%=userInfo.sex%>" == "1") ? true : false;
        wxUserInfo.headimgurl = '<%=userInfo.headimgurl%>';
        wxUserInfo.openid = '<%=userInfo.openid%>';
        wxUserInfo.unionid = '<%=userInfo.unionid%>';
    }
</script>
